package day04;

import java.util.Scanner;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/19
 */
public class Test07 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入班级总组数:");
        int a = sc.nextInt();//组数
        System.out.println("请输入班级中每组的人数:");
        int b = sc.nextInt();//每组的人数
        int[] count=new int[a];//记录每组不及格的人数
        double[] sum=new double[a];//记录每组的总分
        int[][] arr = new int[a][b];
        for(int i = 0; i <a; i++){
            for(int j = 0; j <b; j++){
                arr[i][j] = (int)(Math.random()*101);
                if(arr[i][j]<60){
                    count[i]++;
                }
                sum[i]+=arr[i][j];
            }
        }
        for(int i = 0; i <a; i++){
            System.out.println("第一组不及格的人数："+count[i]);
            System.out.println("第一组的平均分"+sum[i]/b);
        }
    }
}
